<?php if(isset($content)) : ?>
<div id="product_left">
  <p id="ctl00_cphMain_pTitle" class="product_left_title">
    <?php
    print l('<span class="breadcrumb">'.$content['category'].'</span>','taxonomy/term/'.$content['tid'], array('absolute'=>true,'html'=>true));
    print '<span class="breadcrumb"> &gt;&gt; </span>';
    print l('<span class="breadcrumb">'.$content['title'].'</span>','node/'.$content['nid'], array('absolute'=>true,'html'=>true));
    ?>
  </p>

  <div class="product_left_details">
    <div id="ctl00_cphMain_dDetails" class="product_left_detail">
      <?php
      print($content['description']);
      if(!empty($content['price_rub']) && !empty($content['price_usd'])) :
        ?>
        <div class="price">
          <?php print t('Цена').": $".$content['price_usd']; ?>
          <?php print t('или') . ' ' . $content['price_rub'] . ' ' . t('руб'); ?>
        </div>
        <?php endif; ?>
      <?php if(!empty($content['xnid']) && !empty($content['xtitle'])) : ?>
      <div class="cross_link"><?php print t('Так же вы можете купить у нас: ').l('<p>'.$content['xtitle'].'</p>',
        'node/'.$content['xnid'],array('absolute'=>true, 'html'=>true, 'attributes'=>array('class'=>array('basic_link')))); ?>
      </div>
      <?php endif; ?>
    </div>
  </div>
</div>

<div id="product_right">
  <div id="product_right_view">
    <div id="product_photo">
      <a href="<?php print $content['photos'][0]; ?>" id="ctl00_cphMain_aDetail" class="fanDetail">
        <img style="width:434px; height:326px;"  src="<?php print $content['photos'][0]; ?>" onload="javascript:document.getElementById('ctl00_cphMain_aZoom').href = this.src;" id="ctl00_cphMain_imgMain" align="center" />
      </a>
    </div>
    <div id="prod_thmb_container">
      <div id="product_photo_thumb">
        <?php
        foreach($content['photos'] as $image) :
          ?>
          <div id="product_photo_thumb_1"><a href="#" onclick="return false;">
            <input type="hidden" class="hidden" value='<?php print $image; ?>' />
            <img  src='<?php print $image; ?>'  align="center" onclick="javascript:document.getElementById('ctl00_cphMain_aZoom').href = this.src;" class="thumbView"/></a>
          </div>
          <?php endforeach; ?>
      </div>
    </div>
    <div style="clear:both;"></div>
  </div>
  <?php
  $prev = '';
  $next = '';
  $temp_arr = $content['nids'];

  if(is_array($temp_arr)) {
    foreach($temp_arr as $key => $value) {
      if($value == $content['nid']) {
        $prev = (isset($temp_arr[$key-1])) ? 'node/'.$temp_arr[$key-1]: '#';
        $next = (isset($temp_arr[$key+1])) ? 'node/'.$temp_arr[$key+1]: '#';
      }
    }
    ?>
    <div id="product_right_navigation">
      <?php ($prev != '#') ? print l('',$prev,array('absolute' => true, 'html' => true, 'attributes' => array('id'=>'ctl00_cphMain_aPrev', 'class'=>array('prev')))) : ''; ?>
      <?php ($next != '#') ? print l('',$next,array('absolute' => true, 'html' => true, 'attributes' => array('id'=>'ctl00_cphMain_aNext', 'class'=>array('next')))) : ''; ?>
      <?php print l('', '' ,array('absolute' => true, 'html' => true, 'attributes' => array('id'=>'ctl00_cphMain_aZoom', 'class'=>array('zoom')))); ?>
    </div>
    <?php
  }
  ?>

</div>
<div style = "clear:both;"></div>
<?php endif; ?>